﻿<html>
<head>
<style>
.content{
	margin-top:100px;
	font-size:45px;
	background-color:#CCC;
}

#menu1 select , #menu2 select{width:200px;height:20px;}
</style>
</head>
<body>
	<div>
		<div id="hint">
			
		</div>
		<input type="button" id="btn1" value="获取数据"></input>
		<div id="menu1">
			<select id="province1"></select>
			<select id="city1"></select>
			<select id="area1"></select>
		</div>
		<div id="menu2">
			<select id="province2"></select>
			<select id="city2"></select>
			<select id="area2"></select>
		</div>
		<div class="content" id="content">
		
		</div>
		
	</div>
<script>
	function setup(){try{
		
		//
		function g(id){return document.getElementById(id);}
		
		//业务
		var size = 0;
		Ajax.request({
			url:"data.php",
			type:"post",
			params:{
				size:size
			},
			unsyn:true,
			success: function(a,b){
				//console.debug(this);
				g("content").innerHTML += this.responseText;
				size += 10;
			}
		});
		var btn = g("btn1"), ct = g("content");
		g("btn1").onclick = function(){
			Ajax.request({
				//url:"data.php",
				url:"http://www.sohu.com",
				type:"GET",
				//params:{
				//	size:size
				//},
				unsyn: true,
				success: function(a,b){
					g("content").innerHTML += this.responseText;
					size += 2;
				}
			});
		}
		window.x = ct;
		window.onscroll = function(e){
			
			//console.debug(content.clientHeight, content.offsetLeft, content.offsetTop, e);
			/*Ajax.request({
				url:"data.php",
				type:"post",
				params:{
					size:size
				}
			});*/
		}
		window.document.body.onclick = function(e){
			var ct = g("content");
			//console.info(e, ct.clientHeight+ct.offsetTop, screen.availHeight);//x.clientHeight+x.offsetTop
		}
		}catch(e){throw(e)}
		
		//级联菜单：
		Ajax.request({
			url: "_ajax.xml.php",
			params:{datetime:"AAA"},
			success: function(){
				//console.debug(this.responseText);
			}
		})
	}
	window.onload = setup;
	
</script>
</body>
</html>